home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / shwdlg16.hqx / ShowDialog XCMD 1.6 / card_8511.txt < prev    next >
Text File  |  1989-05-10  |  4KB  |  92 lines

  1. -- card: 8511 from stack: in.6
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3411
  5. -- name: Type 5 XCMD
  6.  
  7.  
  8. -- part 5 (button)
  9. -- low flags: 80
  10. -- high flags: A003
  11. -- rect: left=295 top=151 right=173 bottom=395
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Type 5 Help
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   ShowDialog 5,4746,3
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part 4 (button)
  28. -- low flags: 00
  29. -- high flags: 0000
  30. -- rect: left=11 top=4 right=64 bottom=78
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 529 / 529
  33. -- text alignment: 1
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: SD
  39.  
  40.  
  41. -- part contents for background part 21
  42. ----- text -----
  43. ShowDialog XCMD Type 5
  44.  
  45. -- part contents for background part 30
  46. ----- text -----
  47. 17
  48.  
  49. -- part contents for background part 18
  50. ----- text -----
  51. Due to the complexity of many sophisticated stacks, providing some sort of interactive help to the end user is a must.  One of the best methods is to create a button or handler that displays a field containing some kind of information.  This is acceptable when your help consists solely of text.  But when your help screens require both text AND graphics your only alternatives are to display a (normally hidden) card picture, go to a "help" card, or to go to a card on a companion "help" stack.
  52.  
  53. Each method has a drawback.  Showing a normally hidden card picture is fine so long as you don't ALREADY have a card picture.  The disadvantage of having help cards in your stack is that you have to figure out some way to "lock out" the help cards so that the end user won't "stumble" onto them while casually browsing the stack.  Having a secondary Help stack circumvents this problem, but then you have to worry about the Help stack being available (You risk getting a "Where is..." dialog box if the Help stack is missing, renamed, or in another folder).
  54.  
  55. ShowDialog Types 5 & 6 provide a method for the display of interactive help screens containing BOTH text AND (color) graphics, that are contained in the stack, but are out-of-sight until needed.
  56.  
  57. ShowDialog XCMD Type 5 displays a dialog containing buttons that, when clicked, will display a corresponding PICT within the dialog.  The buttons 
  58. "gray out" to indicate which one is currently selected.  Clicking on the Cancel button, or hitting enter or return dismisses the dialog.  The PICTs can contain any amount of text and graphics, and can be in color if you wish.
  59.  
  60.  
  61.  
  62. -- part contents for background part 15
  63. ----- text -----
  64. ShowDialog Type 5 parameters are:
  65.  
  66. ShowDialog 5,<DLOG resource ID>,<button # grayed out>,[<top coord>,<left coord>]
  67.  
  68. where 5 is the type of the external;
  69. <DLOG resource ID> is the resource ID of the DLOG template;
  70. <button # grayed out> is the DITL item # of the button that will be initially grayed out when the dialog is first displayed.  Its corresponding PICT will be displayed. 
  71.  
  72. Once again, the last two parameters, for specifying the location of the dialog, are OPTIONAL.
  73.  
  74. A PICT is made to correspond to a particular button by adding 1000 to the DITL item # of the button.
  75. Thus, button #3 will show PICT ID 1003, button #4 will show PICT ID 1004, and so on.
  76.  
  77.  
  78.  
  79. -- part contents for background part 17
  80. ----- text -----
  81. Follow this outline when constructing the DITL resource:
  82. DITL item# 1: an ENABLED button.  This will be the Cancel button.  
  83. DITL item# 2: a DISABLED useritem.  This item will be the area into which the PICTs will be drawn and, consequently, should be made large.
  84.  
  85. The remaining items should be ENABLED buttons.  Give the buttons descriptive names so the user will know why to click a particular button.  
  86.  
  87. The dialog is dismissed by clicking Cancel or hitting enter or return.
  88. If a required PICT resource is missing, the dialog will beep and appear with a blank display.
  89.  
  90. Notice how the buttons gray out when you select them.
  91.  
  92.